$(function () {
   obj.init();
});
var obj = new function () {
    'use strict';
    return {
        form:null,
        init:function () {
            this.form = new xhForm($('#xh_form'));
            this.form.parse();
            $('[name=sInDepId]').select2();
            this.listener();
        },
        listener:function () {
            var $this = this;
            $('#bt_modal_confirm',parent.document).click(function () {
                $this.funObj().clickConfirm();
            });
        },
        funObj:function () {
            var $this = this;
            return {
                clickConfirm:function () {
                    $this.form.submit('hrm/mine/addTransfer',{},function (res) {
                        window.top.xhTop.showSuccess(res.msg);
                        window.top.xhTop.closeModal();
                    })
                }
            }
        }
    }
};